package com.wkq.database.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.wkq.database.dao.ExceptionInfo;
import com.wkq.database.dao.UserInfo;
import com.wkq.database.dao.CollectionNewsInfo;
import com.wkq.database.dao.SignInInfo;
import com.wkq.database.dao.NewsComment;

import com.wkq.database.dao.ExceptionInfoDao;
import com.wkq.database.dao.UserInfoDao;
import com.wkq.database.dao.CollectionNewsInfoDao;
import com.wkq.database.dao.SignInInfoDao;
import com.wkq.database.dao.NewsCommentDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig exceptionInfoDaoConfig;
    private final DaoConfig userInfoDaoConfig;
    private final DaoConfig collectionNewsInfoDaoConfig;
    private final DaoConfig signInInfoDaoConfig;
    private final DaoConfig newsCommentDaoConfig;

    private final ExceptionInfoDao exceptionInfoDao;
    private final UserInfoDao userInfoDao;
    private final CollectionNewsInfoDao collectionNewsInfoDao;
    private final SignInInfoDao signInInfoDao;
    private final NewsCommentDao newsCommentDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        exceptionInfoDaoConfig = daoConfigMap.get(ExceptionInfoDao.class).clone();
        exceptionInfoDaoConfig.initIdentityScope(type);

        userInfoDaoConfig = daoConfigMap.get(UserInfoDao.class).clone();
        userInfoDaoConfig.initIdentityScope(type);

        collectionNewsInfoDaoConfig = daoConfigMap.get(CollectionNewsInfoDao.class).clone();
        collectionNewsInfoDaoConfig.initIdentityScope(type);

        signInInfoDaoConfig = daoConfigMap.get(SignInInfoDao.class).clone();
        signInInfoDaoConfig.initIdentityScope(type);

        newsCommentDaoConfig = daoConfigMap.get(NewsCommentDao.class).clone();
        newsCommentDaoConfig.initIdentityScope(type);

        exceptionInfoDao = new ExceptionInfoDao(exceptionInfoDaoConfig, this);
        userInfoDao = new UserInfoDao(userInfoDaoConfig, this);
        collectionNewsInfoDao = new CollectionNewsInfoDao(collectionNewsInfoDaoConfig, this);
        signInInfoDao = new SignInInfoDao(signInInfoDaoConfig, this);
        newsCommentDao = new NewsCommentDao(newsCommentDaoConfig, this);

        registerDao(ExceptionInfo.class, exceptionInfoDao);
        registerDao(UserInfo.class, userInfoDao);
        registerDao(CollectionNewsInfo.class, collectionNewsInfoDao);
        registerDao(SignInInfo.class, signInInfoDao);
        registerDao(NewsComment.class, newsCommentDao);
    }
    
    public void clear() {
        exceptionInfoDaoConfig.clearIdentityScope();
        userInfoDaoConfig.clearIdentityScope();
        collectionNewsInfoDaoConfig.clearIdentityScope();
        signInInfoDaoConfig.clearIdentityScope();
        newsCommentDaoConfig.clearIdentityScope();
    }

    public ExceptionInfoDao getExceptionInfoDao() {
        return exceptionInfoDao;
    }

    public UserInfoDao getUserInfoDao() {
        return userInfoDao;
    }

    public CollectionNewsInfoDao getCollectionNewsInfoDao() {
        return collectionNewsInfoDao;
    }

    public SignInInfoDao getSignInInfoDao() {
        return signInInfoDao;
    }

    public NewsCommentDao getNewsCommentDao() {
        return newsCommentDao;
    }

}
